#include <stdio.h>
#include <string.h>

int main(void) {
    struct Student {
        char name[20];
        int age;
        float score;
        char sex[10];
    };
    struct Student stu;
    struct Student *p;
    p = &stu;
    (*p).age = 10;
    printf("%d\n", (*p).age);
    //给stu赋值
    (*p).score = 20;
    printf("%d\n", (*p).score);
    strcpy(stu.name, "John");
    printf("%s\n", (*p).name);
    strcpy(p->sex, "male");
    printf("%s\n",(*p).sex);
    return 0;
}